<!--<template>-->
<!--  <el-table-->
<!--      ref="elTable"-->
<!--      v-bind="$attrs"-->
<!--      v-on="$listeners"-->
<!--      style="width: 100%"-->
<!--      border-->
<!--      :stripe="preferences.Tablestripe"-->
<!--      :max-height="maxHeight"-->
<!--      :tooltip-effect="tooltipEffect"-->
<!--  >-->
<!--    <template slot="default" v-if="$slots['default']">-->
<!--      <slot name="default"></slot>-->
<!--    </template>-->
<!--    <template slot="append" v-if="$slots['append']">-->
<!--      <slot name="append"></slot>-->
<!--    </template>-->
<!--  </el-table>-->
<!--</template>-->

<script>
import ElTable from "element-ui/packages/table/src/table";
import preferences from "../../config/preferences";
export default {
  name: "MTable",
  data() {
    return {};
  },
  extends: ElTable,
  props: {
    tooltipEffect: {
      type: String,
      default: "dark",
    },
    maxHeight: {
      type: [String, Number],
      default: preferences.TableMaxHeight,
    },
    stripe: {
      type: Boolean,
      default: preferences.Tablestripe,
    },
    border: {
      type: Boolean,
      default: true,
    },
  },
  components: {},
  mounted() {},
  methods: {
    // clearSelection(){
    //   this.$refs.elTable.clearSelection()
    // },
    // toggleRowSelection(row, selected){
    //   this.$refs.elTable.toggleRowSelection(row, selected)
    // },
    // toggleAllSelection(){
    //   this.$refs.elTable.toggleAllSelection()
    // },
    // toggleRowExpansion(row, expanded){
    //   this.$refs.elTable.toggleRowExpansion(row, expanded)
    // },
    // setCurrentRow(row){
    //   this.$refs.elTable.setCurrentRow(row)
    // },
    // clearSort(){
    //   this.$refs.elTable.clearSort()
    // },
    // clearFilter(columnKey){
    //   this.$refs.elTable.clearFilter(columnKey)
    // },
    // doLayout(){
    //   this.$refs.elTable.doLayout()
    // },
    // sort(prop,order){
    //   this.$refs.elTable.sort(prop,order)
    // },
  },
};
</script>

<style lang="scss">
@import "../../style/var";
.el-table {
  .el-button--text {
    padding-top: 0;
    padding-bottom: 0;
  }
}
.el-table thead th {
  background-color: #edf1f7 !important;
  color: $fontColorW;
}
.el-table--border th {
  //.el-table--border td
  // border-right-color: #d3d7de !important;
  &::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: px2(1);
    height: px2(15);
    background-color: #d3d7de;
  }
}
.el-table th.is-leaf,
.el-table td {
  //border-bottom-color: transparent!important; ;
}
.el-table__row--striped {
  // background-color: #fff !important;
}
.el-tooltip__popper {
  max-width: 40%;
}
.el-table .el-table__cell {
  padding: 0px 0 !important;
}
.el-table .cell {
  line-height: 32px !important;
  min-height: 33px;
}
.el-table .el-table__header-wrapper .el-table__cell {
  padding: 0px 0 !important;
}
.el-table .el-table__row.hover-row .el-table__cell {
  background-color: #f2f2f2 !important;
}
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background-color: #fff !important;
}
</style>
